package com.weishi.project.training.service.impl;

import java.util.List;
import java.util.Optional;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.weishi.project.training.mapper.DynamometerSubsectionMapper;
import com.weishi.project.training.domain.DynamometerSubsection;
import com.weishi.project.training.service.IDynamometerSubsectionService;

import javax.annotation.Resource;

/**
 * 测功仪分段数据Service业务层处理
 */
@Service
public class DynamometerSubsectionServiceImpl extends ServiceImpl<DynamometerSubsectionMapper, DynamometerSubsection> implements IDynamometerSubsectionService {

    @Resource
    private DynamometerSubsectionMapper dynamometerSubsectionMapper;

    /**
     * 查询测功仪分段数据列表
     */
    @Override
    public List<DynamometerSubsection> selectDynamometerSubsectionList(DynamometerSubsection dynamometerSubsection) {
        return dynamometerSubsectionMapper.selectDynamometerSubsectionList(dynamometerSubsection);
    }



    /**
     * 重新封装 根据组id ，航道 id ， 训练课 id 查询的 List 数据
     */
    @Override
    public List<DynamometerSubsection> listZHKID(Integer groupId , Integer channelId , Integer trainingDayId) {
        return this.list(Wrappers.<DynamometerSubsection>lambdaQuery()
                .eq(DynamometerSubsection::getGroupId , groupId)
                .eq(DynamometerSubsection::getChannelId , channelId)
                .eq(DynamometerSubsection::getTrainingDayId , trainingDayId));
    }









}